﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using matrixdotnet.Common;

namespace matrixdotnet.CommonDAL
{
    public interface IDataEntityFinder<TIdentity, TUniqueKey, TBusinessEntity, TDataEntity>
        where TIdentity : struct
        where TUniqueKey : struct
        where TBusinessEntity : class, IBusinessEntity<TUniqueKey>
        where TDataEntity : IDataEntity<TIdentity, TUniqueKey, TBusinessEntity>, TBusinessEntity
    {
        TDataEntity FindDataEntity(TUniqueKey uniqueKey);
        TDataEntity FindDataEntity(TIdentity identity);
    }

    public interface IDataEntityFinderL<TUniqueKey, TBusinessEntity, TDataEntity> :
        IDataEntityFinder<long, TUniqueKey, TBusinessEntity, TDataEntity>
        where TUniqueKey : struct
        where TBusinessEntity : class, IBusinessEntity<TUniqueKey>
        where TDataEntity : IDataEntity<long, TUniqueKey, TBusinessEntity>, TBusinessEntity
    {
    }
}
